Let the total number of candidates who appeared from Maharashtra = .
From Maharashtra, 9% of candidates got selected. Hence, the number of selected candidates from Maharashtra =
Let the total number of candidates who appeared from Tripura = .
From Tripura, 12% of candidates got selected. Hence, the number of selected candidates from Tripura =
According to the problem, the number of selected candidates from Tripura is 102 more than those selected from Maharashtra. Hence,
Also, we are given that the number of candidates who appeared from both states is equal:
Substitute into the equation:
Simplify:
Thus, the number of candidates who appeared from both Maharashtra and Tripura is